import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from "@vitejs/plugin-vue-jsx";
// https://vitejs.dev/config/
export default defineConfig({
    plugins: [vue(), vueJsx()], 
    resolve: {
        //添加文件扩展名
        extensions: ['.ts', '.js', '.vue']
    },
    server: {
        proxy: {
            '^/adminapi': {
                target: 'http://10.31.3.26/adminapi', // 后端服务实际地址
                changeOrigin: true, //开启代理
                rewrite: (path) => path.replace(/^\/adminapi/, '')
            }
        }
    }
   });
